package com.xinqi.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xinqi.dto.PageData;
import com.xinqi.entity.Blog;
import com.xinqi.dto.Result;
import com.xinqi.entity.User;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;


/**
 * @author xin麒
 * @date 2023/6/25 9:09
 */
public interface BlogService extends IService<Blog> {
    List<Blog> getPageByLimited(Page<Blog> pageParam);

    Integer queryBlogLikesNumber(Long id);

    Result likeBlog(Long blogId, Long userId);

    List<Long> queryAllBlogLikesUserIds(Long id);

    List<User> getAllBlogLikesUsersByBlogId(Long id);

    void durableForLikeListByBogId(Long id);

    Map<String,String> queryAllBlogLikesUserIdWithScores(Long id);
    HashMap<String, String> getIdsInTableByBlogId(Long id);

    public Result updateAllLikeListToDatabase();

    public Result updateAllLikeListToDatabaseByThreads();
    public Result updateAllLikeListToDatabaseByThreadsWithNoJoin();

    public Result updateAllLikeListToDatabaseByNoThreads();
}

